package com.ujoin.action.collection;

import org.springframework.beans.factory.annotation.Autowired;

import com.ujoin.bean.Collection;
import com.ujoin.service.CollectionService;
import com.ujoin.util.ActionEnhanced;

import freemarker.template.utility.Execute;

public class InvalidateCollectionByIdAction extends ActionEnhanced {

	private int collectionId;
	
	public int getCollectionId() {
		return collectionId;
	}

	public void setCollectionId(int collectionId) {
		this.collectionId = collectionId;
	}

	@Autowired
	private CollectionService collectionService;
	
	@Override
	public String execute() {
		setJson(collectionService.invalidateCollectionById(collectionId));
		return SUCCESS;
	}
}
